{{include file="header.html"}}
{{include file="menu.html"}}
<!-- banner图 -->

<!-- <div class="banner"><img src="{{$banner.params.image|photo:2300:300:true}}" alt=""></div> -->
<!-- 轮播 -->
<div class="container">
    <div class="wrapper">

        <div class="left">
            <div class="bt">
                <p>{{$menu.title}}</p>
                <span style="text-transform:uppercase;">{{$menu.app}}</span>
                <div class="bg"></div>
            </div>
            <ul class="news_gg">
                {{if $menu.submenu}}
                {{foreach from=$menu.submenu item=val key=key}}
                <li {{if $result.alias == $key || $result.data.0.item == $key}}class="current"{{/if}}><a href="index.php?app={{$menu.app}}&act={{$key}}">{{$val}}</a></li>
                {{/foreach}}
                {{/if}}
            </ul>
        </div>
        <div class="right">
            <div class="item">
                <div class="title">{{if $menu.submenu[$result.data.0.item]}}{{$menu.submenu[$result.data.0.item]}}{{elseif $result.title}}{{$result.title}}{{/if}}<span style="text-transform:uppercase;">/{{if $result.data.0.item}}{{$result.data.0.item}}{{elseif $result.alias}}{{$result.alias}}{{/if}}</span></div>
                <div class="place">当前位置：<a href="index.php?app={{$menu.app}}&act={{$menu.act}}">{{$menu.title}}</a>->{{if $result.title}}{{$result.title}}{{elseif $menu.submenu[$result.data.0.item]}}{{$menu.submenu[$result.data.0.item]}}{{/if}}</div>
                <div class="clear"></div>
            </div>
            {{if $result.alias}}
            <div class="cont">
                {{$result.params.content|decodeHtml}}
            </div>
            {{elseif $result.data && !$download}}
            <div class="list">
                <div class="article_list">
                    <ul>
                        {{foreach from=$result.data item=val}}
                        <li>
                            <a href="index.php?app={{$menu.app}}&act=detail&id={{$val.id}}" target="_blank">
                                {{if $val.image}}
                                <div class="imgbox">
                                    <img src="{{$val.image|photo:170:110:true}}" alt="">
                                </div>
                                {{/if}}
                                <div class="article_p {{if !$val.image}}notice{{/if}}">
                                    <div class="title"><span>{{$val.title}}</span>{{if $val.times < '3'}}<i></i>{{/if}}</div>
                                    <p>
                                        {{$val.params.resume}}
                                    </p>
                                    <span>发布时间：{{$val.params.time}}<i class="num">浏览次数：{{$val.hit}}</i></span>
                                    <div class="detail">详情》</div>
                                </div>
                                <div class="clear"></div>
                            </a>
                        </li>
                        {{/foreach}}
                    </ul>
                </div>
            </div>
            {{elseif $result.data && $download}}
            <div class="box">
                <div class="bo_list policy">
                    <div class="li">
                        <ul>
                            {{if $result.data}}
                            {{foreach from=$result.data item=val}}
                            <li><a href="javascript:" class="download" >{{$val.title|default:$val.files}}</a>
                                <span class="date">{{$val.params.time|date_format:"Y-m-d"}}</span><a href="javascript:"><button style="cursor:pointer" onclick="download({{$val.id}});">下载</button></a></li>
                            {{/foreach}}
                            {{/if}}
                        </ul>
                    </div>
                </div>
            </div>
            {{/if}}
            {{include file="page.html"}}
        </div>
        <div class="clear"></div>
    </div>
</div>
<script type="text/javascript">
    function download(id){
        $.post('{{"index.php?app=Download&act=fileDownload"|URL}}',{'id':id},function(result){
            if(result.statusCode=='200'){
                var url = "{{$smarty.const.__PUB__}}"+result.message;
                //                url = setURLArg(url,'file_path',result.message);
                document.location.href = url;
            }else if(result.statusCode=='300') ui.error(result.message);
        },'json');
    }
</script>
{{include file="footer.html"}}